package com.bjpowernode.rbac.mapper;

import com.bjpowernode.rbac.entity.Employee;
import com.bjpowernode.rbac.query.EmployeeQuery;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface EmployeeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Employee record);

    int insertSelective(Employee record);

    Employee selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Employee record);

    int updateByPrimaryKey(Employee record);

    List<Employee> selectByCondition(EmployeeQuery employeeQuery);

    void deleteRelation(Long id);

    void insertRelation(@Param("empId") Long empId,@Param("roleId") Long roleId);

    Employee selectEmpByUsernameAndPwd(@Param("userName") String userName, @Param("password") String password);

    List<Employee> selectAllSellers();

    List<Employee> selectAllNewSellers();
}